package mediator.pattern.demo;

/**
 * Created by 逸足天涯
 * Date: 2019/10/17.
 * Time: 14:23
 */
public class Friend2 extends Friend {

    public Friend2(Mediator mediator, String name) {
        super(mediator);
        this.name = name;
    }
    @Override
    public void send(String message){
        mediator.send(this,message);
    }
    @Override
    public void notify(String message){
        System.out.println(this.name + "gets message: " + message);
    }

}
